namespace Blog2025.Domain.Events;

/// <summary>
/// 用户删除事件
/// </summary>
public class UserDeletedEvent : IDomainEvent
{
    /// <summary>
    /// 事件唯一标识
    /// </summary>
    public Guid EventId { get; }

    /// <summary>
    /// 用户ID
    /// </summary>
    public Guid UserId { get; }

    /// <summary>
    /// 用户名
    /// </summary>
    public string Username { get; }

    /// <summary>
    /// 删除时间
    /// </summary>
    public DateTime OccurredOn { get; }

    /// <summary>
    /// 删除操作人ID
    /// </summary>
    public Guid DeletedBy { get; }

    public UserDeletedEvent(Guid userId, string username, Guid deletedBy)
    {
        EventId = Guid.NewGuid();
        UserId = userId;
        Username = username;
        DeletedBy = deletedBy;
        OccurredOn = DateTime.UtcNow;
    }
}